package behavioral_pattern.mediator_pattern.concrete_colleague;


import behavioral_pattern.mediator_pattern.colleague.IDepartment;
import behavioral_pattern.mediator_pattern.mediator.IMediator;

/*
 * @Author xuhj
 * @Description 采购部门
 * @Date 12:19 下午 2022/1/9
 * @Param
 * @return
 **/
public class PurchaseDepartment extends IDepartment {
    @Override
    public void setProductNum(Integer productNum) {

    }

    public PurchaseDepartment(IMediator mediator) {
        super(mediator);
    }

    @Override
    public void work(Integer num) {
        this.productNum += num;
        System.out.println("采购商品完成");
    }
    /**
     *
     */
    @Override
    public void communicat(String communicationType) {
        mediator.operate(communicationType, this.productNum);
    }
}
